<?php

namespace app\common\model;

use think\Model;


class LevelSetting extends Model
{

    

    

    // 表名
    protected $name = 'level_setting';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';

    // 定义时间戳字段名
    protected $createTime = 'create_time';
    protected $updateTime = 'update_time';
    protected $deleteTime = false;

    // 追加属性
    protected $append = [
		'level_text'
    ];
    
	public function getLevelTextAttr($value, $data) {
		$value = $value ? : $data['level'];
		$list = \app\admin\model\User::$levelList;
		return $list[$value] ??'';
	}
    







}
